﻿using Microsoft.Extensions.Options;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OptinMonitorTest
{
    public class OptionService
    {
        private readonly IOptions<MyOptions> options;

        public OptionService(IOptions<MyOptions> options)
        {
            this.options = options;
        }

        public void show()
        {
            Console.WriteLine("Option:begin---");
            Console.WriteLine(options.Value.ToString());
            Console.ReadKey();
            Console.WriteLine(options.Value.ToString());
            Console.WriteLine("Option:end----");
        }
    }
}
